
<?php include './application/views/common/header.php'; ?>
<script type="text/javascript" src="/static/js/My97DatePicker/WdatePicker.js"></script>
<table width="90%" cellspacing="0" cellpadding="0" border="0" class="user_table">
	<tr>
		<td valign="top" class="user_table_td"><?php include './application/views/common/user_left.php'; ?></td>
		<!-- Left End -->
		<td valign="top">
		<div class="user_list_title">
		  <ul>
			<li <?php if($type == 6){?>class="li2"<?php }?> ><a href="/userborrow/yjbborrow.html">易居宝借款列表</a></li>
		  </ul>
		</div>
		<!-- User_List_Title End -->
		<div class="user_list_con">
		<!-- User_List_Search End -->
		<table width="100%" border="0" cellspacing="0" cellpadding="0">
		  <tr bgcolor="#F3F3F3" height="40px">
			<td align="center"><strong>标题</strong></td>
			<td align="center"><strong>类型</strong></td>
			<td align="center"><strong>借款金额</strong></td>
			<td align="center"><strong>审核时间</strong></td>
			<td align="center"><strong>状态</strong></td>
			<td align="center"><strong>操作</strong></td>
		  </tr>
		  <?php $statusArr = array(1=>'未审核',2=>'招标中',3=>'已满标',4=>'已还完',5=>'已取消',);?>
		  <?php foreach($list as $borrow){?>
		  <tr height="35px" id="borrow_<?php echo $borrow['id'];?>">
			<td align="center"><a href="/borrow/slobj/<?php echo $borrow['id'];?>" target="_blank"><?php echo $borrow['title'];?></a></td>
			<td align="center">易居宝</td>
			<td align="center">&yen;<?php echo number_format($borrow['account'],2);?>元</td>
			<td align="center"><?php echo $borrow['verify_time']>0?date('Y-m-d',$borrow['verify_time']):'尚未审核';?></td>
			<td align="center"><?php echo $statusArr[$borrow['fstatus']];?></td>
			<td align="center"><?php if($borrow['fstatus']<=1){?><a href="javascript:if(confirm('你确定撤回？')){withdraw(<?php echo $borrow['id'];?>);}">撤标</a><?php }?></td>
		  </tr>
		  <?php }?>
		  <tr>
		  	<td align="center" colspan="6" class="page"><?php echo $this->pagination->create_links();?></td>
		  </tr>
		</table>

		</div>
		<!-- User_List_Con End -->
		</td>
	</tr>
</table>
<script>
function withdraw(borrow_id){
	$.ajax({
		type: "get",
		url: "/userborrow/yjbwithdraw/"+borrow_id,
		success: function(msg){
			$("#dialog" ).dialog();
			if(msg == 1){
				$("#msg").html("撤标成功！");
				$("#borrow_"+borrow_id).hide();
			}else{
				$("#msg").html("撤标失败，请联系管理员！");
			}
			setTimeout(function(){
				$("#dialog" ).dialog("close");
			},3000);
		},
		dataType: "text"
	});
}x
</script>
<?php include './application/views/common/footer.php'; ?>